package com.lj.infoisland.domain.es;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author 龙洁
 * @description es新闻类
 * @create 2025-01-19 21:23
 */
@Document(indexName = "news_index")
@Data
public class EsNews {
    @Id
    private String id;

    @Field(type = FieldType.Keyword, analyzer = "ik_max_word")
    private String title;

    @Field(type = FieldType.Keyword, analyzer = "ik_max_word")
    private String description;

    @Field(type = FieldType.Keyword)
    private String categoryId;

    @Field(type = FieldType.Keyword)
    private String contentUrl;

    @Field(type = FieldType.Keyword)
    private String coverImage;

    @Field(type = FieldType.Keyword)
    private String userUniqueId;

    @Field(type = FieldType.Integer)
    private int isPublished;

    @Field(type = FieldType.Integer)
    private Integer viewNum;

    @Field(type = FieldType.Integer)
    private Integer likeNum;

    @Field(type = FieldType.Integer)
    private Integer favoriteNum;

    @Field(type = FieldType.Integer)
    private Integer status;

    @Field(type = FieldType.Date)
    private Date publishedAt;
}
